home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pdox35sc.zip / PICTURE.SC < prev    next >
Text File  |  1991-06-10  |  4KB  |  70 lines

  1. ; ***************************************************************************************
  2. ;             GENERIC UTILITY TO SET PICTURE FORMATS IN ANY FIELD
  3.  
  4. ; Copyright 1991   Virginia B. Sauer   All Rights Reserved
  5. ; This program may be copied/modified without charge provided both that this
  6. ; copyright notice is included without change, and that any accompanying
  7. ; documentation includes the notice "Portions of code (c) Copyright 1991,
  8. ; Virginia B. Sauer"
  9. ; ***************************************************************************************
  10.  
  11. ; ╔═════════════════════════════════════════════════════════════════════════════╗
  12. ; ║                                  TO EXECUTE                                 ║
  13. ; ╟─────────────────────────────────────────────────────────────────────────────╫
  14. ; ║                                                                             ║
  15. ; ║  To be able to invoke this during any edit session:                         ║
  16. ; ║                                                                             ║
  17. ; ║     (1)  Add the following line to your init script:                        ║
  18. ; ║          SetKey -25 Play "Picture"                                          ║
  19. ; ║                                                                             ║
  20. ; ║     (2)  Whenever you want to invoke this, move to the table and field      ║
  21. ; ║          desired and press Alt-P (i. e., hold down the Alt key and press    ║
  22. ; ║          the P key).                                                        ║
  23. ; ║                                                                             ║
  24. ; ╟─────────────────────────────────────────────────────────────────────────────╫
  25. ; ║                                                                             ║
  26. ; ║  Should you prefer not to place this in your init script:                   ║
  27. ; ║                                                                             ║
  28. ; ║          Whenever you want to invoke this, move to the table and field you  ║
  29. ; ║          want to change.  Press Alt-F10 to invoke the PAL menu, select      ║
  30. ; ║          miniscript, and type "Play Picture".                               ║
  31. ; ║                                                                             ║
  32. ; ╚═════════════════════════════════════════════════════════════════════════════╝
  33.  
  34. ; ───────────────────────────────────────────────────────────────────────────────────────
  35. ;              *************** I M P O R T A N T   N O T E ***************
  36.  
  37. ; This proc is usually assigned to a hot key.
  38.  
  39. ; Since it is a development tool used for developing all applications, it is customarily
  40. ; written to a separate library, such as ToolBox.
  41.  
  42. ; The init script assigning the hot keys is then placed in the developer's private
  43. ; directory.
  44. ; ───────────────────────────────────────────────────────────────────────────────────────
  45.  
  46. Proc Picture()
  47.    Private UserChoice
  48.    If SysMode() <> "Edit" and SysMode() <> "Data Entry"
  49.       Then EditKey
  50.    EndIf
  51.    Wait Record
  52.       Prompt Format("W80,AC","Use the arrow keys to move to the field for which you want to set a"),
  53.              Format("W80,AC","picture validity check.  Press the <Enter> key to select that field.")
  54.    Until "Enter", "Esc"
  55.    ShowMenu
  56.       "!*[{ ,-[ ],.[ ],;,[ ]}!,@]" : "Proper Case",
  57.       "*!"                         : "All Upper Case",
  58.       "(###) ###-####"             : "Telephone Number",
  59.       "#####[-####]"               : "Zip Code",
  60.       "*#"                         : "All Numbers",
  61.       "##:##"                      : "Time",
  62.       "{Yes,No}"                   : "Yes, No",
  63.       "Clear"                      : "Remove Validity Check",
  64.       "Quit"                       : "Do Not Set Picture"
  65.    To UserChoice
  66.    Menu {ValCheck} {Define} Enter {Picture} CtrlBackSpace TypeIn UserChoice Enter Do_It!
  67.    Editkey
  68. EndProc
  69. Picture()
  70.